package com.py.credit.dao;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.py.credit.entity.FinanceModel;
import com.py.credit.entity.Index;
import com.py.framework.core.common.Page;

public interface IndexDao {

	public void insertIndex(@Param(value = "index") Index index);

	public Index selectIndexById(@Param(value = "map") Map params);

	public void updateIndexById(@Param(value = "index") Index index);

	public void deleteIndexAndCatgoryById(@Param(value = "list") List<String> list);

	public void deleteIndexById(@Param(value = "list") List<String> list);

	public List<Index> getIndexForPage(@Param(value = "map") Map map, @Param(value = "page") Page page);

	public Integer indexDelCheck(@Param(value = "list") List<String> list);

	public List<String> selectRelateSourceById(@Param(value = "list") List<String> list);

	public List<LinkedHashMap> selectTreeFromIndex(@Param(value = "mainType") String mainType,
			@Param(value = "name") String name);

	public List<LinkedHashMap<String, Object>> selectByConditionForPage(@Param(value = "map") Map map,
			@Param(value = "columns") List<String> columns,
			@Param(value = "additionalColumns") String[] additionalColumns,
			@Param(value = "conditions") List<String> conditions, @Param(value = "page") Page page);

	public List<Map<String, Object>> searchFinance(@Param(value = "map") Map<String, Object> map);

	public List<Map<String, Object>> searchAllData(@Param(value = "pgId") String pgId);

	public List<LinkedHashMap<String, Object>> searchFinanceIndexData(@Param(value = "pgId") String pgId);

	public void saveFinanceData(@Param(value = "financeModel") FinanceModel financeModel);

	public FinanceModel getFinancePreviousYearData(@Param(value = "map") Map<String, Object> map);

	public void deleteFinanceData(@Param(value = "pgId") String pgId);

	public Map<String, Object> getQnQData(@Param(value = "map") Map<String, Object> map);

	public void insertFinanceDataNull(@Param(value = "financeModel") FinanceModel financeModel);

	public List<com.py.credit.entity.ColumnAndCal> selectCalFormulaBycolName(
			@Param(value = "colNameEN") String colNameEN);

	public void editStatusById(@Param(value = "id") String id);

	public void updateStatusBymodelId(@Param(value = "params") Map<String, String> params);

	public String selectDataBycolmunEN(@Param(value = "params") Map<String, String> params);

	public String getTybmById(@Param(value = "userId") String userId);

	public List<Map<String, String>> selectModelBindIndexForPage(@Param(value = "id") String id,
			@Param(value = "page") Page page);
}
